//
//  SSquedingCell.m
//  Hand-held_kitchen
//
//  Created by 张张烨 on 16/1/23.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "SSquedingCell.h"
#import "HorViewController.h"
@implementation SSquedingCell

- (void)dealloc
{
    [_tupian release];
    [_shijian release];
    [_mingzi release];
    [_neirong release];
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self =[super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        
        self.tupian = [[UIImageView alloc]init];
        [self.contentView addSubview:_tupian];
        [_tupian release];
        
        self.mingzi = [[UILabel alloc]init];
        [self.contentView addSubview:_mingzi];
        [_mingzi release];
        
        self.neirong = [[UILabel alloc]init];
        _neirong.font = [UIFont systemFontOfSize:12];
        _neirong.numberOfLines = 3;
        [self.contentView addSubview:_neirong];
        [_neirong release];
        
        self.shijian = [[UILabel alloc]init];
        _shijian.font = [UIFont systemFontOfSize:12];
        [self.contentView addSubview:_shijian];
        [_shijian release];
        
        self.image = [[UIImageView alloc]init];
        _image.image = [UIImage imageNamed:@"bofang"];
        [self.contentView addSubview:_image];
        
        
        
        
        
        self.button = [UIButton buttonWithType:(UIButtonTypeSystem)];
//        _button.backgroundColor = [UIColor redColor];
        
        self.button.userInteractionEnabled = YES;
        
        
        [_button addTarget:self action:@selector(fangfa) forControlEvents:
         (UIControlEventTouchUpInside)];
        
        [self.contentView addSubview:_button];
        
        
        
    }
    return self;
}


-(void)fangfa
{
    
    [self.deledate tiaozhuan];
    
    
}


-(void)layoutSubviews
{
    [super layoutSubviews];
    _tupian.frame = CGRectMake(10, 10, 90, 90);
    _image.frame = CGRectMake(40, 40, 30, 30);
    _button.frame = CGRectMake(40, 40, 30, 30);
    _mingzi.frame =CGRectMake(110, 10, 200, 30);
    _neirong.frame = CGRectMake(110, 10, 200, 90);
    _shijian.frame = CGRectMake(110, 78, 200, 25);
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
